@extends('admin/layout')

@section('content')
    <div class="content-wrapper">
    <section class="content-header">
        <h1>
            网站配置
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">config</a></li>
        </ol>
    </section>
    <div class="content-wrapper">
    <section class="content">
    <div class="row">
    <div class="col-md-12">
        <div class="box box-info"  style="width: 60%; margin-left: -200px; padding-bottom:8px">
            <div class="box-header with-border">
                <h3 class="box-title">网站参数表</h3>
                <span id="msg" style="display: none">
                    @if (count($errors) > 0)
                        @foreach ($errors->all() as $error)
                            <div style="width: 100%;">
                                <span style="color: red;display: block;margin: 0px auto;width: 200px;text-align: center;">{{ $error }}</span>
                            </div>
                        @endforeach
                    @else
                        <div style="width: 100%;">
                            <span style="color: green;display: block;margin: 0px auto;width: 200px;text-align: center;">{{ Session::get('msg') }}</span>
                        </div>
                    @endif
                </span>
                <script type="text/javascript">
                    var _msg = $('#msg div span').text();
                    console.log(_msg);
                    if(_msg != ''){
                        layer.msg(_msg);
                    }
                </script>
                <form action="{{ url('admin/config/setHot') }}" method="post" class="form-horizontal">
                    {{ csrf_field() }}
                    <div class="box-body">
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">首页标题：</label>

                            <div class="col-sm-10">
                                <input type="text" name="title" class="form-control" id="inputEmail3" value="{{ $hot->title }}" placeholder="Title" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">公司电话：</label>

                            <div class="col-sm-10">
                                <input type="text" name="telephone" class="form-control" id="inputEmail3" value="{{ $hot->telephone }}" placeholder="telephone">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">公司邮箱：</label>

                            <div class="col-sm-10">
                                <input type="text" name="email" class="form-control" id="inputEmail3" value="{{ $hot->email }}" placeholder="email" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">公司地址：</label>

                            <div class="col-sm-10">
                                <input type="text" name="address" class="form-control" id="inputEmail3" value="{{ $hot->address }}" placeholder="address">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">热门一：</label>

                            <div class="col-sm-10">
                                <input type="text" name="hot1" class="form-control" id="inputEmail3" value="{{ $hot->hot1 }}" placeholder="热门一">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">热门二：</label>

                            <div class="col-sm-10">
                                <input type="text" name="hot2" class="form-control" id="inputEmail3" value="{{ $hot->hot2 }}" placeholder="热门二">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">热门三：</label>

                            <div class="col-sm-10">
                                <input type="text" name="hot3" class="form-control" id="inputEmail3" value="{{ $hot->hot3 }}" placeholder="热门三">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">热门四：</label>

                            <div class="col-sm-10">
                                <input type="text" name="hot4" class="form-control" id="inputEmail3" value="{{ $hot->hot4 }}" placeholder="热门四">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">热门五：</label>

                            <div class="col-sm-10">
                                <input type="text" name="hot5" class="form-control" id="inputEmail3" value="{{ $hot->hot5 }}" placeholder="热门五">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">热门六：</label>

                            <div class="col-sm-10">
                                <input type="text" name="hot6" class="form-control" id="inputEmail3" value="{{ $hot->hot6 }}" placeholder="热门六">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">热门七：</label>

                            <div class="col-sm-10">
                                <input type="text" name="hot7" class="form-control" id="inputEmail3" value="{{ $hot->hot7 }}" placeholder="热门七">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">热门八：</label>

                            <div class="col-sm-10">
                                <input type="text" name="hot8" class="form-control" id="inputEmail3" value="{{ $hot->hot8 }}" placeholder="热门八">
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <button type="submit" class="btn btn-info pull-right">保存</button>
                    </div>
                    <!-- /.box-footer -->
                </form>
            </div>
        </div>
    </div>
    </div>
    </section>
    </div>
    </div>

@stop